<template>
  <ym-maker-container :elements="elements" :value="value"/>
</template>

<script>
import YmMakerContainer from "@/ym/maker/YmMakerContainer";
import { Quarks } from "@/store/quark";
import {FORM, LABEL_WIDTH, Widgets} from "@/store/form";
import { PASCAL, WIDGET } from "@/store/elementui";

export default {
  data () {
    const es = Quarks

    return {
      elements: Object.keys(es).map((key) => {
        return {
          ...es[key],
          [PASCAL]: key
        }
      }),
      value: {
        ...Widgets[FORM],
        [WIDGET]: FORM,
        [LABEL_WIDTH]: 'auto',
        fields: [],
      }
    }
  },
  components: {
    YmMakerContainer
  }
}
</script>
